package cn.com.self.apis.escrow.entity;

import java.math.BigDecimal;

import cn.com.self.apis.files.entity.Files;
import cn.com.selfsoft.smartcity.commons.entity.AbstractEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author liangwt
 * @since 2020-05-28
 */
@ApiModel(value = "托管信息类")
@TableName("escrow_info")
public class EscrowInfo extends AbstractEntity implements Serializable {

    private static final long serialVersionUID=1L;

    /**
     * 发起人id
     */
    @ApiModelProperty(value = "发起人id",required=true)
    private String initiatorId;

    /**
     * 需求方手机号
     */
    @NotBlank(message = "需求方手机号不能为空")
    @Pattern(regexp ="^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "需求方手机号格式有误")
    @ApiModelProperty(value = "需求方手机号")
    private String demandMobilePhone;

    /**
     * 需求方姓名
     */
    @TableField(exist=false)
    @ApiModelProperty(value = "需求方姓名")
    private String demandName;

    /**
     * 开发方姓名
     */
    @TableField(exist=false)
    @ApiModelProperty(value = "开发方姓名")
    private String developName;
    /**
     * 开发方手机号
     */
    @NotBlank(message = "开发方手机号不能为空")
    @Pattern(regexp ="^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "开发方手机号格式有误")
    @ApiModelProperty(value = "开发方手机号")
    private String developMobilePhone;

    /**
     * 项目名称
     */
    @ApiModelProperty(value = "项目名称")
    private String projectName;

    /**
     * 总金额
     */
    @ApiModelProperty(value = "总金额")
    private BigDecimal totalAmount;

    /**
     * 项目状态（0取消、1违约审核、2同意违约、3进行中、4终验、5完结）
     */
    @ApiModelProperty(value = "项目状态（0取消、1违约审核、2同意违约、3进行中、4终验、5完结）")
    private Integer projectStatus;

    /**
     * 需求描述
     */
    @ApiModelProperty(value = "需求描述")
    private String demandDesc;

    /**
     * 需求附件id
     */
    @ApiModelProperty(value = "需求附件id")
    private String demandFileId;

    /**
     * 合同（附件id）
     */
    @ApiModelProperty(value = "合同（附件id）")
    private String contractFileId;

    /**
     * 进度（起步、50%、90%、100%）
     */
    @ApiModelProperty(value = "进度（起步、50%、90%、100%）")
    private String progress;

    /**
     * 托管方式
     */
    @ApiModelProperty(value = "托管方式")
    private String escrowType;

    /**
     * 有无纠纷（1有、0无）
     */
    @ApiModelProperty(value = "有无纠纷（1有、0无）")
    private Integer dispute;
    @ApiModelProperty(value = "已托管金额")
    private BigDecimal amontEd;

    @ApiModelProperty(value = "下架时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date downTime;

    @ApiModelProperty(value = "备注")
    private String remarks;

    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createDate;
    @ApiModelProperty(value = "更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date updateDate;

    @ApiModelProperty(value = "删除状态（字典 delFlag 0正常 1已删除）")
    private String delFlag;

    @TableField(exist=false)
    @ApiModelProperty(value = "需求附件列表")
    private ArrayList<Files> demandFiles;

    @TableField(exist=false)
    @ApiModelProperty(value = "合同附件列表")
    private ArrayList<Files> contractFiles;


    public String getDemandName() {
        return demandName;
    }

    public void setDemandName(String demandName) {
        this.demandName = demandName;
    }

    public ArrayList<Files> getDemandFiles() {
        return demandFiles;
    }

    public void setDemandFiles(ArrayList<Files> demandFiles) {
        this.demandFiles = demandFiles;
    }

    public ArrayList<Files> getContractFiles() {
        return contractFiles;
    }

    public void setContractFiles(ArrayList<Files> contractFiles) {
        this.contractFiles = contractFiles;
    }

    public String getInitiatorId() {
        return initiatorId;
    }

    public void setInitiatorId(String initiatorId) {
        this.initiatorId = initiatorId;
    }

    public String getDemandMobilePhone() {
        return demandMobilePhone;
    }

    public void setDemandMobilePhone(String demandMobilePhone) {
        this.demandMobilePhone = demandMobilePhone;
    }

    public String getDevelopMobilePhone() {
        return developMobilePhone;
    }

    public void setDevelopMobilePhone(String developMobilePhone) {
        this.developMobilePhone = developMobilePhone;
    }

    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    public BigDecimal getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(BigDecimal totalAmount) {
        this.totalAmount = totalAmount;
    }

    public Integer getProjectStatus() {
        return projectStatus;
    }

    public void setProjectStatus(Integer projectStatus) {
        this.projectStatus = projectStatus;
    }

    public String getDemandDesc() {
        return demandDesc;
    }

    public void setDemandDesc(String demandDesc) {
        this.demandDesc = demandDesc;
    }

    public String getDemandFileId() {
        return demandFileId;
    }

    public void setDemandFileId(String demandFileId) {
        this.demandFileId = demandFileId;
    }

    public String getContractFileId() {
        return contractFileId;
    }

    public void setContractFileId(String contractFileId) {
        this.contractFileId = contractFileId;
    }

    public String getProgress() {
        return progress;
    }

    public void setProgress(String progress) {
        this.progress = progress;
    }

    public String getEscrowType() {
        return escrowType;
    }

    public void setEscrowType(String escrowType) {
        this.escrowType = escrowType;
    }

    public Integer getDispute() {
        return dispute;
    }

    public void setDispute(Integer dispute) {
        this.dispute = dispute;
    }

    public BigDecimal getAmontEd() {
        return amontEd;
    }

    public void setAmontEd(BigDecimal amontEd) {
        this.amontEd = amontEd;
    }

    public Date getDownTime() {
        return downTime;
    }

    public void setDownTime(Date downTime) {
        this.downTime = downTime;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getDevelopName() {
        return developName;
    }

    public void setDevelopName(String developName) {
        this.developName = developName;
    }
}
